After Not Doing Something by Ron Newcomb

Version 2

"Allows us to write rules that happen after an action fails, such as 'After not examining or searching something'"
Jump to extension code
Jump to "I Try, and I Try" example

Error

Includes and Included by are omitted for modules with errors

ni



You wrote 'Include (- -) instead of "Begin Action" in "Actions.i6t"' (Ron Newcomb/After Not Doing Something.i7x, line 29):
but this syntax was withdrawn in April 2022, in favour of a more finely
controlled inclusion command. See the manual, but you can probably get what
you want using 'replacing "SomeFunctionName".' rather than 'instead of
...'.
Copy Include After Not Doing Something by Ron Newcomb to clipboard Include After Not Doing Something by Ron Newcomb.
Inform has always allowed us to write rules which take place after a character has done something.

After doing something to the fragile wineglass, say "Careful, that's real crystal."

But Inform doesn't allow us the same flexibility if whatever action we were attempting failed. This extension addresses this by allowing us to write "after not" rules.

After not taking or climbing something, say "Maybe if you washed the butter off your fingers?"

Just like the After and Instead rules, the After Not rules will only run the single most applicable rule, unless of course that rule ends with "make no decision".


Example: * I Try, and I Try - Some people are never happy.

Copy "I Try, and I Try" to clipboard
"I Try, and I Try"

Include after not doing something by Ron Newcomb.

Your parent's house is a room. Your disapproving mother is a woman, here. A TV is fixed in place, here.

After not doing something, say "In the background, you hear your mother sigh. 'Oh if you'd only worked harder, [the current action] wouldn't be a problem now, would it?'"

After not pushing or rubbing something, say "Your mother sighs. 'Here, *I'll* get it for you.'"

Test me with "go outside / turn on TV / dust TV / push TV / nap".
Version 2 of After Not Doing Something by Ron Newcomb begins here.

"Allows us to write rules that happen after an action fails, such as 'After not examining or searching something'"

The after not rules are an action based rulebook.
The after not rules have default success.

Include (-
[ BeginAction a n s moi notrack rv previous_actor;
    ChronologyPoint();

    @push action; @push noun; @push second; @push self; @push multiple_object_item;

    action = a; noun = n; second = s; self = noun; multiple_object_item = moi;
    if (action < 4096) {
     previous_actor = actor;
     rv = ActionPrimitive();
     if (rv == false && RulebookFailed()) {
       actor = previous_actor;
       FollowRulebook((+ the after not rules +));
     }
    }

    @pull multiple_object_item; @pull self; @pull second; @pull noun; @pull action;

    if (notrack == false) TrackActions(true, meta);
    return rv;
];
-). Include (- -) instead of "Begin Action" in "Actions.i6t". [ rulechange_sp isn't declared until later ]

After Not Doing Something ends here.